package cz.acies.face.viewers;

import java.util.ArrayList;
import java.util.List;

public class TableViewer extends Viewer
{
	private static final long serialVersionUID = 6089168962159303508L;

	protected String modulId = "";
	protected String userId = "";
	
	protected List<TableColumnDefine> columnDefs;
	
	public TableViewer() {}
	
	@Override
	public void createPartControl() {}
	
	public List<TableColumnDefine> getColumnDefs() {
		if (columnDefs == null) {
			TableColumnDefine[] tcds = createColumnDefs();
			columnDefs = new ArrayList<TableColumnDefine>();
			for (int i = 0; i < tcds.length; i++) {
				columnDefs.add(tcds[i]);	
			}
		}
		System.out.println(columnDefs);
		return columnDefs;
	}

	protected TableColumnDefine[] createColumnDefs() { return new TableColumnDefine[0]; }
	
	protected List<TableColumnDefine> createColumns() {
		return getColumnDefs();
	}
	
	public String getModulId() {
		return modulId;
	}
	
	public void setModulId(String modulId) {
		this.modulId = modulId;
	}
	
	@Override
	public Object getInput() {
		return null;
	}
	
	@Override
	public void setInput(Object input) {}
	
	@Override
	public String toHtml() {
		String html = "";
		
		return html;
	}

}
